package com.cssw.fyzb.busi.api.live;

import com.cssw.fyzb.busi.service.live.AnchorService;
import com.ydn.appserver.Action;
import com.ydn.appserver.Request;
import com.ydn.appserver.Response;
import com.ydn.appserver.annotations.Function;
import com.ydn.appserver.annotations.Parameter;
import com.ydn.appserver.annotations.Type;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 删除管理员
 * @author wondream
 */
@Function(description = "删除管理员", parameters = {
        @Parameter(name = "id", type = Type.String, description = "记录ID", required = true)
})
@Component
public class RemoveAnchorManage implements Action {

    @Autowired
    AnchorService anchorService;

    @Override
    public Response execute(Request request) throws Exception {
        Long id = request.getLong("id");
        anchorService.removeAnchorManageById(id);
        return Response.success("操作成功");
    }
}
